Method for binarizing scanned document images containing gray or light colored text printed with halftone pattern

ABSTRACT

A method for binarizing a scanned document images containing gray or light colored text printed with halftone patterns. The document image is initially binarized and connected image components are extracted from the initial binary image as text characters. Each text character is classified as either a halftone text character or a non-halftone text character based on an analysis of its topology features. The topology features may be the Euler number of the text character; a text character with a Euler number below −2 is classified as halftone text. The gray-scale document image is then divided into halftone text regions containing only halftone text characters and non-halftone text regions. Each region is binarized using its own pixel value statistics. This eliminates the influence of black text on the threshold values for binarizing halftone text. The binary maps of the regions are combined to generate the final binary map.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to method and apparatus for binarizing scanneddocument images, and in particular, it relates to a method and apparatusfor binarizing scanned document images that contain gray or lightcolored text printed with halftone patterns.

2. Description of Related Art

With the development of computer technology and the Internet, electronicdocuments are becoming more and more popular because of its advantagesover paper based documents, such as easy storage, easy search andretrieve, fast transmission, and environmental friendliness. In thepast, paper based documents have dominated for a long time and a largeamount of paper based documents have been generated over the years. Apaper based document can be converted to an electronic document using ascanner. For documents that contain text, it is further desirable toconvert the scanned document images into text for text searching andother purposes.

Automatic document analysis systems have been developed to convertscanned document images into searchable electronic documents. Such asystem typically includes three major components, namely a binarizationcomponent, a segmentation component, and an optical characterrecognition (OCR) component. The first component, binarization,separates the foreground (text, picture, line drawing, etc.) from thebackground. It converts a color or gray-scale image into a binary imagewhere each pixel has a value of zero or one. Binarization is animportant step because the subsequent segmentation and recognitioncomponents rely on high quality binarized images. Good binarizationresults not only can decrease the computational load and simplify thesubsequent analysis, but also can improve the overall performance of theautomatic document analysis system.

In conventional methods, binarization is typically performed eitherglobally or locally. Global binarization methods use one calculatedthreshold value for the entire scanned image to convert multi-bit pixelvalues into binary pixel values. Pixel values above the threshold valueare converted to 1 (or 0) and pixel values below the threshold value areconverted to 0 (or 1). Local binarization methods use adaptedstatistical values calculated from local areas as threshold values forbinarization of the local areas.

Examples of global binarization methods can be found in N. Otsu, “AThreshold Selection Method from Gray-Level Histograms,” IEEETransactions on Systems, Man, and Cybernetics, Vol. 9, No. 1, 1979, pp.62-66 (hereinafter “Otsu”); A. Rosenfield, R. C. Smith, “Thresholdingusing Relaxation”, IEEE Transactions on Pattern Analysis and MachineIntelligence, Vol. 3, No. 5, 1981, pp. 598-606; and V. A. Shapiro, P. K.Veleva, V. S. Sgurev, “An Adaptive Method for Image Thresholding”,Proceedings of the 11th IAPR International Conference on PatternRecognition, 1992, pp. 696-699. Examples of local binarization methodscan be found in W. Niblack, “An introduction to Image Processing”,Prentice-Hall, Englewood Cliffs, 1986, pp. 115-116; J. Sauvola, M.Pietikainen, “Adaptive document image binarization”, PatternRecognition, Vol. 33, 2000, pp. 225-236 (hereinafter “Sauvola et al.”);and I. Kim, D. Jung, R. Park, Document image binarization based ontopographic analysis using a water flow model, Pattern Recognition Vol.35, 2002, pp. 265-277.

SUMMARY

Accordingly, the present invention is directed to a binarization methodthat substantially obviates one or more of the problems due tolimitations and disadvantages of the related art.

An object of the present invention is to produce high quality binaryimage from a scanned gray-scale image that contains both halftone textand non-halftone text.

Additional features and advantages of the invention will be set forth inthe descriptions that follow and in part will be apparent from thedescription, or may be learned by practice of the invention. Theobjectives and other advantages of the invention will be realized andattained by the structure particularly pointed out in the writtendescription and claims thereof as well as the appended drawings.

To achieve these and/or other objects, as embodied and broadlydescribed, the present invention provides a method implemented in a dataprocessing apparatus for binarizing a gray-scale document image whichhas been generated by scanning a paper-based document, the methodincluding: (a) identifying text characters in the gray-scale documentimage; (b) classifying each text character identified in step (a) aseither a halftone text character or a non-halftone text character basedon a topological analysis of the text character; and (c) binarizinghalftone text characters using pixel value characteristics obtained fromonly halftone text characters classified in step (b).

The method may further include: (d) after step (b) and before step (c),dividing the gray-scale document image into halftone text regionscontaining only halftone text characters and non-halftone text regionscontaining non-halftone text characters, wherein step (c) comprisesbinarizing each halftone text region using pixel value statisticscalculated from pixels in that region only, to generate a binary map foreach halftone text region.

The method may further include: (e) after step (d), binarizing eachnon-halftone text region using pixel value statistics calculated frompixels in that region only, to generate a binary map for eachnon-halftone text region; and (f) combining the binary maps for thehalftone text regions and the binary maps for the non-halftone textregion generated in steps (c) and (e) to generate a binary map of thegray-scale document image.

In another aspect, the present invention provides a computer programproduct comprising a computer usable non-transitory medium (e.g. memoryor storage device) having a computer readable program code embeddedtherein for controlling a data processing apparatus, the computerreadable program code configured to cause the data processing apparatusto execute the above methods.

In another aspect, the present invention provides a scanner including: ascanning section for scanning a hard copy document to generate agray-scale document image; and a data processing apparatus forprocessing the gray-scale document image to generate a binary map of thegray-scale document image, wherein the processing includes the abovemethod steps.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and areintended to provide further explanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1( a) is an enlarged view illustrating a scanned image of text whenthe corresponding text in the paper document was printed as black text.

FIG. 1( b) is an enlarged view illustrating a scanned image of text whenthe corresponding text in the paper document was printed as a halftonegray color.

FIG. 1( c) schematically illustrates an image of a page of documentcontaining both dark (black) text and light (gray) text.

FIGS. 2( a) and 2(b) schematically illustrate a method for binarizingscanned document images containing gray or light colored text printedwith halftone pattern according to a first embodiment of the presentinvention.

FIG. 3 schematically illustrates a method for binarizing scanneddocument images containing gray or light colored text printed withhalftone pattern according to a second embodiment of the presentinvention.

FIGS. 4( a)-4(d) are images of text characters in a scanned documentshowing the Euler numbers for non-halftone and halftone text characters.

FIGS. 5( a) and 5(b) show portions of binarization results using amethod according to the first embodiment of the present invention.

FIGS. 6( a) and 6(b) show portions of binarization results using aconventional global thresholding method.

FIG. 7 schematically illustrates a scanner including a data processingapparatus in which binarization methods according to embodiments of thepresent invention may be implemented.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments of the present invention provide an improved method forbinarizing document images obtained by scanning a paper based document.In this disclosure, the terms “paper based document”, “printed document”and “hard copy document” are used interchangeably. These documents neednot be printed on paper only; they may be printed on other physicalmedia such as transparency, etc.

With the desire for high quality text and pictures, printed documentsare typically scanned at a high resolution, for example, often at 600dpi (dots per inch) or higher. In a printed document, gray or lightcolor text or image is often printed using a halftone method. Forexample, a printed gray area will contain a plurality of black dots ofink or toner, the sizes and/or density of the dots being dependent onthe gray-scale value of the gray area. Similarly, light colored areasare printed by printing color saturated dots. In this disclosure, textprinted by a halftone method is referred to as halftone text.

When a printed document containing halftone text is scanned at a highresolution, in particular, when the pixel size of the scan issubstantially smaller than the halftone dots, the halftone dots aretypically visible in the scanned image. FIG. 1( b) is an enlarged viewillustrating a scanned image of text when the corresponding text in thepaper document was printed as a halftone gray color. In thisillustration, the halftone dots are clearly visible. Further, thescanned pixels in the halftone text have various gray pixel values.Pixels located within a halftone dot tend to have darker gray pixelvalues, and pixels located in areas between adjacent halftone dots tendto have lighter gray or white pixel values. The varying gray pixelvalues arise from the limited sensitivity or accuracy of the scannerused to scan the document.

As a comparison, FIG. 1( a) is an enlarged view illustrating a scannedimage of text when the corresponding text in the paper document wasprinted as black text. There are no visible halftone dots. Further, thepixel values within the text area are a black value or close to a blackvalue.

Black text and gray text often co-exist in the same page of document.FIG. 1( c) schematically illustrates an image of a page of documentcontaining both black text (schematically represented by thick solidlines 11) and gray text.

In this disclosure, when referring to pixel values, a “black value”refers to a numerical value representing a black pixel and a “whitevalue” refers to a numerical value representing a white pixel. In manysystems, a white pixel has a pixel value 255 and a black pixel has apixel value 0. A “gray value” is value between a black value and a whitevalue.

Although black and gray text is used in these illustrations, the sameeffects exist in color images, where the text may be printed as colorsaturated text (similar to black text) or light colored text (similar tolight gray text, using a halftone method). The descriptions below useblack as an example, but the method described herein is applicable tocolored text as well.

When a printed document contains both black text and halftone text,conventional binarization methods often lead to unsatisfactory resultsfor the halftone text. As mentioned earlier, conventional binarizationmethods typically perform binarization either globally or locally.Neither conventional global binarization methods nor conventional localbinarization methods produce satisfactory results on scanned images withhalftone text. Typically, halftone text makes up only a small portion ofan entire document image. As explained earlier, due to the presence ofthe halftone pattern, pixel values of halftone text tend to be a grayvalue while pixel values of non-halftone text tend to be much closer toa black value. As a result, when a global threshold method is used, suchas Otsu threshold described in the Otsu reference, the calculated globalthreshold value tends to be very close to the black pixel value of thedark text. When binarization is carried out using such a thresholdvalue, the halftone text is often completely or partially absent in thebinarization result because their pixel values do not satisfy thethreshold value. Even when a local threshold method is used, some of thehalftone text may still be absent if a major portion of text in thelocal window is dark text. The situation becomes worse when halftonetext is at lighter gray level (i.e. close to the background value). Poorbinarization results for halftone text have severe adverse effects onthe subsequent components of the automatic document analysis system, inparticular the OCR component.

FIG. 2( a) schematically illustrates a method for binarizing scanneddocument images containing gray or light colored text printed withhalftone pattern according to an embodiment of the present invention.This method separates halftone text from non-halftone text based on ananalysis of the topological features of the text characters, and thenbinarizes halftone text and non-halftone text separately using theirrespective threshold values.

First, the scanned document image is initially binarized (step S21).This step may use any suitable local or global textual binarizationmethod, including conventional methods. Typically, local binarizationinvolves dividing the image into multiple small non-overlapping blocks,calculating a threshold value for each block, and binarizing the blockusing the threshold value. In one embodiment, a method described inSauvola et al. is used to perform the initial binarization. An initialbinary image is generated by step S21.

Connected image components in the initial binary image are thenextracted (step S22). In a binary image, a connected image component isa connected group of pixels of the same pixel value (e.g. black).Methods for extracting connected image components are generally known;any suitable algorithm may be employed in this step. Each connectedimage component extracted in this step is potentially a text character.Steps S21 and S22 collectively can be referred to as a step ofidentifying text characters in the scanned document image.

Then, each connected image component (text character) is classified aseither a halftone text character or a non-halftone text character basedon an analysis of its topology features (steps S23 and S24). Because ofthe halftone process, connected image components for halftone textcontain many more holes than connected image components for non-halftonetext. A hole is an area of white pixels enclosed by black pixels of aconnected image component. In a preferred embodiment, this feature isused to classify each connected image component (character). In aparticular embodiment, the Euler number is used as a criterion forclassifying halftone text characters and non-halftone text characters.The Euler number (an integer) is a measure of the topology of an image.It is defined asE=C−H,where E is the Euler number, C is the number of connected imagecomponents in the image and H is the number of holes. The Euler numberfor a text character (e.g. English letters and Arabic numerals) istypically 1, 0 or −1. For example, as shown in FIGS. 4( a)-4(c), thecharacter “C” has an Euler number of 1, because it has one connectedimage component and no holes; the character “A” has an Euler number of0, because it has one connected image component and one hole; and thenumeral “8” has an Euler number of −1, because it has one connectedimage component and two holes. Because halftone text typically containsmany holes, the Euler number for a halftone text character (includingnumerals) is generally much smaller than −1. For example, the halftoneletter “N” in FIG. 4( d) has an Euler number of −43. As such, the Eulernumber is a good measure for halftone text detection.

In step S23, the Euler number for each detected text character (i.e.connected image component) is calculated. Any suitable algorithm may beused to calculate the Euler number. In step S24, each connected imagecomponent is classified as either a halftone text character or anon-halftone text character based on its Euler number. In oneimplementation, a connected image component is classified as halftonetext character if it has an Euler number below a predefined value, suchas −2. Otherwise, it is classified as a non-halftone text character.

More generally, step S23 is a step of analyzing topological features ofthe text characters, and step S24 is a step of classifying textcharacters based on the topological features. Collectively, steps S23and S24 constitute a step of classifying text characters as eitherhalftone text characters or non-halftone text characters based ontopological analyses.

More specifically, steps S23 and S24 may be implemented by a decisionloop as shown in FIG. 2( b). The connected image components (i.e. textcharacter) are processed one at a time. For the next connected imagecomponent (“Y” in step S231), its Euler number is calculated (stepS232). Then, it is determined whether the Euler number is smaller than−2 (step S241). If it is (“Y” in step S241), the text character isclassified as a halftone text character (step S242). If it is not (“N”in step S241), the text character is classified as a non-halftone textcharacter (step S243). The process then determines whether there is anext connected image component to be processed (step S231). If yes (“Y”in step S231), steps S232, A241, S242 and S243 are repeated. If thereare no more connected image components to be processed (“N” in stepS231), the process continues to the next step (i.e. to step S25).

It should be noted that FIG. 2( b) is only an exemplary implementation.In an alternative implementation (not shown in the figures), the step ofextracting connected image components (step S22) can be placed insidethe loop, i.e., after one connected image component is extracted, itsEuler number is calculated and it is classified as a halftone ornon-halftone text character, and then the next connected image componentis extracted and the process repeats. One skilled in the art willrecognize that other suitable implementations exist.

After the detected text characters in the document image are classifiedinto halftone and non-halftone text, the document image is divided intohalftone text regions containing only halftone text characters andnon-halftone text regions containing non-halftone text characters (stepS25). The non-halftone text regions may also contain other documentelements such as graphics, pictures, etc., if they are present in thescanned document image. There may be a single or multiple halftone textregions and a single or multiple non-halftone text regions. In FIG. 1(c), the different text regions are schematically indicated by thindotted lines, which define a non-halftone text region 13 and a halftonetext region 14.

In a preferred embodiment, the division step S25 is accomplished byapplying binary morphological operations to the non-halftone text and/orhalftone text. Morphology is a broad set of image processing operationsthat process images based on shapes. Morphological operations apply astructuring element to an input image, creating an output image of thesame size. In a morphological operation, the value of each pixel in theoutput image is based on a comparison of the corresponding pixel in theinput image with its neighbors. By choosing the size and shape of theneighborhood (structure element), one can construct a morphologicaloperation that is sensitive to specific shapes in the input image. Themost basic morphological operations are dilation and erosion. In apreferred implementation, binary morphological operations are applied tothe halftone text to generate the halftone text regions, and the samebinary morphological operations are applied to the non-half tone text togenerate the non-halftone text regions. Alternatively, binarymorphological operations are applied to the halftone text to generatethe halftone text regions, and the remaining regions of the image areconsidered non-halftone text regions. In a preferred embodiment, thestructure element parameters used in the dilation operations areestimated from the width and height of the halftone text characters andnon-halftone text characters respectively. They may be chosen as apredefined number of times of the average width and average height ofthe text characters.

Then, for each halftone text region and each non-halftone text region, alocal thresholding or global thresholding method is performed on theoriginal scanned document image to binarize the image to generate afinal binarization result (binary map) for the region (step S26). Inother words, each region is binarized using pixel value characteristicsobtained from pixels in that region only. In particular, in eachhalftone text region, pixel value characteristics of the halftone textin that region only are used to calculate the threshold value forbinarizing the halftone text.

In a preferred implementation, a conventional method described in theOtsu reference is used to perform thresholding for each halftone textregion. Because the image has been divided into halftone text regionsand non-halftone text regions, even a conventional thresholding methodapplied to a halftone text region will produce satisfactory binarizationresult for the halftone text. This is because a halftone text regioncontains only halftone text and a threshold values calculated byconventional thresholding method will not be influenced by non-halftonetext. In a preferred implementation, each non-halftone text region isbinarized using a conventional thresholding method described in the Otsureference. Of course, other thresholding methods may be used to binarizethe halftone text regions and the non-halftone text regions.

After the regions are binarized, the binary maps of the multiple regionsare combined to generate a binary map of the entire scanned documentimage (step S27).

FIG. 3 schematically illustrates a method for binarizing scanneddocument images containing gray or light colored text printed withhalftone pattern according to a second embodiment of the presentinvention. In the second embodiment, steps S31 to S34 are identical tosteps S21 to S24 in the first embodiment shown in FIGS. 2( a) and 2(b).

After most of the halftone text characters are identified by theclassification step S34, the pixel value statistics of the halftonetext, such as the mean pixel value, minimum pixel value and maximumpixel value, are estimated (step S35). It should be noted that for thispurpose, it is not necessary to have all the characters of halftone textidentified; missing a few halftone characters will not cause asignificant change in the estimated pixel value statistics. Then, thescanned document image is binarized using the pixel value statistics ofthe halftone text to generate a first binary image (step S36). In apreferred embodiment, pixels having pixel values falling between theminimum and maximum pixel values are assigned one binary value (e.g.black), and pixels having pixel values falling outside of that range areassigned the other binary value (e.g. white). The resulting first binaryimage contains binarized images of the halftone text of the originalscanned document. The first binary image also contain other imagescorresponding to certain gray pixels in the original scanned documentthat are not halftone text, notably pixels at edges of black textcharacters.

Then, the scanned document image is binarized again to generate a secondbinary image (step S37). Any suitable binarization method, such asconventional local or global binarization methods, may be used in thisstep. Preferably, before this binarization step, the original scanneddocument image is modified to set the pixel values of the halftone textcharacter obtained in S36 to the background value (e.g. white). As aresult, the halftone text character found in S36 will not appear in thesecond binary image. The reason for this is to minimize the influence ofthe halftone text on the calculation of the threshold for non-halftonetext in step S37. Then, the first and second binary images are combined(by a bitwise AND operation) to generate a final binary image. Becausethe first binary image contains the binarized halftone text and thesecond binary image contains binarized non-halftone text, the finalbinary image can be a satisfactory binarization result for both halftoneand non-halftone text.

It can be seen that in both binarization methods described above (firstand second embodiments), text characters are classified into halftonetext characters and non-halftone text characters, and then halftone textis binarized using pixel value characteristics obtained from thehalftone text only. Compared with conventional methods such as globalhistogram based thresholding methods, the binarization methods accordingto embodiments of the present invention produce better binarizationresult on scanned document images containing both halftone text andnon-halftone text.

The inventors tested a particular implementation of the first embodimenton document images contains both halftone text and non halftone text.Portions of the binarization result corresponding to the sample imagesin FIGS. 1( a) and 1(b) are shown in FIGS. 5( a) and 5(b).

For the initial binarization (step S21), a conventional method describedin Sauvola et al. was used in the test. Specifically, the scanneddocument image is divided into blocks of 64×64 pixels, and the thresholdvalue for each block is calculated by the following formula:T=m*(1+k*(s/R−1));where T is the calculated threshold value for the block, m is the meanpixel value of the block, S is the standard deviation of the pixel valueof the block, constant k is 0.2, and constant R is 128. The Euler numberwas used as the topological features in step S23, and connected imagecomponents with Euler numbers less than −2 were classified as halftonetext in step S24.

In step S25, dilation operations were applied to the halftone text togenerate the halftone text regions, and applied to the non-half tonetext to generate the non-halftone text regions. For halftone text, thewidth and height of the structure element used the dilation operationswere both four times the average width and average height of thehalftone text. For non-halftone text, the width and height of thestructure element were both two times the average width and averageheight of the non-halftone text.

In the final binarization step S26, the halftone text regions and thenon-halftone regions were separately binarized using the Otsu method.

For comparison, the inventors applied the conventional Otsu's method tobinarize the same test document. Portions of the binarization resultcorresponding to the sample images in FIGS. 1( a) and 1(b) are shown inFIGS. 6( a) and 6(b). Through visual comparison, it can be seen thatwhile the binarization results for black text (FIGS. 5( a) and 6(a) arecomparable using both techniques, for halftone text, the result usingthe method described above (FIG. 5( b)) is significantly better than theresult using the conventional global threshold method (FIG. 6( b)). Itcan be seen that in FIG. 6( b), the connectivity of the text charactersis not properly preserved and there are many holes in the binarized textcharacters. In FIG. 5( b), the connectivity of the text characters ispreserved significantly better, and there are far fewer or no holes inthe binarized text characters.

The inventors further inputted the two binarization results into the OCRText Recognition function of Adobe™ Acrobat™ 9 Pro. When thebinarization result of the global threshold method was fed to the OCRfunction, only less than 57% of the halftone text characters werecorrectly recognized. When the binarization result using the methoddescribed above was fed to the OCR function, 99% of the halftone textcharacters were correctly recognized. This demonstrates that a betterbinarization result can improve performance of the automatic documentanalysis system including the OCR component.

The inventors also tested an implementation of the second embodiment ondocument images contains both halftone text and non halftone text. Thebinarization results show that this implementation is superior to theconventional Otsu's method discussed above, but less satisfactory thanthe implementation of the first embodiment. Therefore, the inventorscurrently believe that the first embodiment is the best mode forcarrying out the invention.

The methods described above can be implemented in a data processingapparatus which includes a processor, a memory (e.g. RAM) and a storagedevice (e.g. ROM) for storing programs, as shown in FIG. 7. The dataprocessing apparatus may be a standalone computer, or it may be a partof a scanner (including a multi-function printer-scanner-copier device)which also includes a scanning section for scanning a hard copy document(see FIG. 7). The data processing apparatus carries out the method bythe processor executing computer programs stored in the memory. The dataprocessing apparatus takes a scanned gray-scale image as input andgenerates a binary image as output. In one aspect, the invention is amethod carried out by a data processing apparatus. In another aspect,the invention is a computer program product embodied in computer usablenon-transitory medium having a computer readable program code embeddedtherein for controlling a data processing apparatus. In another aspect,the invention is embodied in a data processing apparatus such as acomputer or a scanner. In particular, the invention may be embodied in ascanner which includes a scanning section for scanning hard copydocuments to generate the gray-scale scanned image, and a dataprocessing apparatus for binarizing the scanned document image togenerate a binary document image.

It will be apparent to those skilled in the art that variousmodification and variations can be made in the binarization method andapparatus of the present invention without departing from the spirit orscope of the invention. Thus, it is intended that the present inventioncover modifications and variations that come within the scope of theappended claims and their equivalents.

What is claimed is:
 1. A method implemented in a data processingapparatus for binarizing a gray-scale document image which has beengenerated by scanning a paper-based document, the method comprising: (a)identifying text characters in the gray-scale document image, including:performing an initial binarization of the gray-scale image to generatean initial binary image; and extracting connected image components inthe initial binary image as text characters; (b) classifying each textcharacter identified in step (a) as either a halftone text characterwhich is a character formed by a halftone pattern or a non-halftone textcharacter based on a topological analysis of the text character whichdetermines a number of holes in a connected image componentcorresponding to the text character, including calculating an Eulernumber for each text character; and classifying a text character ashalftone text if the Euler number for the text character is below apredetermined value, and classifying a text character as non-halftonetext if the Euler number of the text character is equal to or above thepredetermined value; and (c) binarizing halftone text characters usingpixel value characteristics obtained from only halftone text charactersclassified in step (b).
 2. The method of claim 1, further comprising:(d) after step (b) and before step (c), dividing the gray-scale documentimage into halftone text regions containing only halftone textcharacters and non-halftone text regions containing non-halftone textcharacters, wherein step (c) comprises binarizing each halftone textregion using pixel value statistics calculated from pixels in thatregion only, to generate a binary map for each halftone text region. 3.The method of claim 2, further comprising: (e) after step (d),binarizing each non-halftone text region using pixel value statisticscalculated from pixels in that region only, to generate a binary map foreach non-halftone text region.
 4. The method of claim 3, furthercomprising: (f) combining the binary maps for the halftone text regionsand the binary maps for the non-halftone text region generated in steps(c) and (e) to generate a binary map of the gray-scale document image.5. The method of claim 2, wherein step (d) comprises applying binarymorphological operations to all non-halftone text characters or to allhalftone text characters or to both.
 6. The method of claim 2, whereinstep (c) comprises applying a local thresholding method to each halftonetext region.
 7. The method of claim 3, wherein step (e) comprisesapplying a local thresholding method or a global thresholding method toeach non-halftone text region.
 8. The method of claim 1, wherein step(c) comprises: (c1) calculating pixel value statistics from at leastsome of the halftone text characters classified in step (b), the pixelvalue statistics including a mean pixel value, a minimum pixel value anda maximum pixel value; and (c2) binarizing the document image using thepixel value statistics calculated in step (c1) to generate a firstbinary image; wherein the method further comprises: binarizing thedocument image to generate a second binary image; and combining thefirst and second binary image using a bitwise AND operation.
 9. Acomputer program product comprising a computer usable non-transitorymedium having a computer readable program code embedded therein forcontrolling a data processing apparatus, the computer readable programcode configured to cause the data processing apparatus to execute aprocess for binarizing a gray-scale document image which has beengenerated by scanning a paper-based document, the process comprising:(a) identifying text characters in the gray-scale document image,including: performing an initial binarization of the gray-scale image togenerate an initial binary image; and extracting connected imagecomponents in the initial binary image as text characters; (b)classifying each text character identified in step (a) as either ahalftone text character which is a character formed by a halftonepattern or a non-halftone text character based on a topological analysisof the text character which determines a number of holes in a connectedimage component corresponding to the text character, including:calculating an Euler number for each text character; and classifying atext character as halftone text if the Euler number for the textcharacter is below a predetermined value, and classifying a textcharacter as non-halftone text if the Euler number of the text characteris equal to or above the predetermined value; and (c) binarizinghalftone text characters using pixel value characteristics obtained fromonly halftone text characters classified in step (b).
 10. The computerprogram product of claim 9, wherein the process further comprises: (d)after step (b) and before step (c), dividing the gray-scale documentimage into halftone text regions containing only halftone textcharacters and non-halftone text regions containing non-halftone textcharacters; wherein step (c) comprises binarizing each halftone textregion using pixel value statistics calculated from pixels in thatregion only, to generate a binary map for each halftone text region. 11.The computer program product of claim 10, wherein the process furthercomprises: (e) after step (d), binarizing each non-halftone text regionusing pixel value statistics calculated from pixels in that region only,to generate a binary map for each non-halftone text region.
 12. Thecomputer program product of claim 11, wherein the process furthercomprises: (f) combining the binary maps for the halftone text regionsand the binary maps for the non-halftone text region generated in steps(c) and (e) to generate a binary map of the gray-scale document image.13. The computer program product of claim 9, wherein step (d) comprisesapplying binary morphological operations to all non-halftone textcharacters or to all halftone text characters or to both.
 14. Thecomputer program product of claim 10, wherein step (c) comprisesapplying a local thresholding method to each halftone text region. 15.The computer program product of claim 11, wherein step (e) comprisesapplying a local thresholding method or a global thresholding method toeach non-halftone text region.
 16. The computer program product of claim9, wherein step (c) comprises: (c1) calculating pixel value statisticsfrom at least some of the halftone text characters classified in step(b), the pixel value statistics including a mean pixel value, a minimumpixel value and a maximum pixel value; and (c2) binarizing the documentimage using the pixel value statistics calculated in step (c1) togenerate a first binary image; wherein the process further comprises:binarizing the document image to generate a second binary image; andcombining the first and second binary image using a bitwise ANDoperation.
 17. A scanner comprising: a scanning section for scanning ahard copy document to generate a gray-scale document image; and a dataprocessing apparatus for processing the gray-scale document image togenerate a binary map of the gray-scale document image, wherein theprocessing of the gray-scale document image includes: (a) identifyingtext characters in the gray-scale document image, including performingan initial binarization of the gray-scale image to generate an initialbinary image, and extracting connected image components in the initialbinary image as text characters, (b) classifying each text characteridentified in step (a) as either a halftone text character which is acharacter formed by a halftone pattern or a non-halftone text characterbased on a topological analysis of the text character which determines anumber of holes in a connected image component corresponding to the textcharacter, including calculating an Euler number for each textcharacter, and classifying a text character as halftone text if theEuler number for the text character is below a predetermined value, andclassifying a text character as non-halftone text if the Euler number ofthe text character is equal to or above the predetermined value, and (c)binarizing halftone text characters using pixel value characteristicsobtained from only halftone text characters classified in step (b). 18.The scanner of claim 17, wherein the processing further includes: (d)after step (b) and before step (c), dividing the gray-scale documentimage into halftone text regions containing only halftone textcharacters and non-halftone text regions containing non-halftone textcharacters, wherein step (c) comprises binarizing each halftone textregion using pixel value statistics calculated from pixels in thatregion only, to generate a binary map for each halftone text region, (e)after step (d), binarizing each non-halftone text region using pixelvalue statistics calculated from pixels in that region only, to generatea binary map for each non-halftone text region, and (f) combining thebinary maps for the halftone text regions and the binary maps for thenon-halftone text region generated in steps (c) and (e) to generate thebinary map.
 19. The scanner of claim 17, wherein step (d) comprisesapplying binary morphological operations to all non-halftone textcharacters or to all halftone text characters or to both.
 20. Thescanner of claim 17, wherein step (c) comprises applying a localthresholding method to each halftone text region.
 21. The scanner ofclaim 17, wherein step (e) comprises applying a local thresholdingmethod or a global thresholding method to each non-halftone text region.